import { Body, Controller, Get, Post, Req, Res } from '@nestjs/common'
import { FinanceService } from './finance.service'
import { Request, Response } from 'express'
@Controller('finance')
export class FinanceController {
  constructor(private readonly FinanceService: FinanceService) {}
  @Get()
  getDate(@Req() req: Request, @Res() res: Response): Promise<any>{
    return this.FinanceService.getFinanceDate(req,res)
  }
  @Post("search")
  searchFinanceData(@Req() req: Request, @Res() res: Response){
    
    return this.FinanceService.searchFinanceData(req,res)
  }
  @Post("add")
  addFinanceData(@Body() body: any) {
    return this.FinanceService.addFinanceData(body)
  }
}
